home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 9483 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.4 KB

  1. Path: solon.com!not-for-mail
  2. From: seebs@solutions.solon.com (Peter Seebach)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: do || die;
  5. Date: 11 Mar 1996 08:25:14 -0600
  6. Organization: Usenet Fact Police (Undercover)
  7. Message-ID: <4i1d4a$1dq@solutions.solon.com>
  8. References: <1996Mar7.052636.59812@ucl.ac.uk> <DnwJKs.KyJ@uns.bris.ac.uk> <mjs.826218466@hubcap> <1996Mar11.130836.4955@friend.kastle.com>
  9. NNTP-Posting-Host: solutions.solon.com
  10.  
  11. In article <1996Mar11.130836.4955@friend.kastle.com>,
  12. Richard Krehbiel <rich@kastle.com> wrote:
  13. >mjs@hubcap.clemson.edu (M. J. Saltzman) wrote:
  14.  
  15. >>    i -= i != 0
  16.  
  17. >Um, wouldn't that be undefined?  The value of i is stored and there
  18. >are two references to i without an intervening sequence point.  One
  19. >reference is implicit by the "-=" operator and the other is explicit.
  20.  
  21. Nope.  It's ok if it's only modified once, and all references are
  22. directly used to compute the new value.  "i -= i" is also legal.
  23.  
  24. I would not have written it; I don't consider it polite to use the
  25. conceptually boolean return from a relational operator as a number, because
  26. it takes a couple of passes to figure out the intent.  But it is legal.
  27.  
  28. -s
  29. -- 
  30. Peter Seebach - seebs@solon.com - Copyright 1996 Peter Seebach.
  31. C/Unix wizard -- C/Unix questions? Send mail for help.  No, really!
  32. FUCK the communications decency act.  Goddamned government.  [literally.]
  33. The *other* C FAQ - http://www.solon.com/~seebs/c/c-iaq.html
  34.